package cn.jd.javase.exvryday.demo;

public class HomeWork {
    public static void main(String[] args){
        //-------重载
        int max = getMax(10,20);
        int max2 = getMax(10,20,30);
        System.out.println(max+""+max2);
        //--------递归
        System.out.println("--------递归");
        System.out.println(sum(10));
    }
    //---------------递归
    public static int sum(int i){
        if (i==0){
            return 0;
        }
        return i + sum(i-1);
    }
    //重载--------------------------
    public static int getMax (int a,int b,int c){
        if(a>b && a>c){
            return a;
        }
        if(b>a && b>c){
            return b;
        }else{
            return c;
        }

    }
    public static int getMax (int a,int b){
        if(a>b){
            return a;
        }else{
            return b;
        }
    }
}



//日期类-----------------------------------------------
class Date{

    int year;
    int month;
    int day;
    Date(){}
    Date(int year ,int month ,int day){
        this.year = year;
        this.month = month;
        this.day = day;
    }
    public void getTime(){
        System.out.println(year+"年"+month+"月"+day+"日");
    }
}
//男人类
class Man{
    String name;
    char sex;
    String identityCard;


}
//女人类
class Woman{
    String name;
    char sex;
    String identityCard;
    String partnerName ;


}
//账户类
class BankAccount{

    String accountNumber;
    String passWord;
    double remainingSum;
}
//微信账号类
class WechatAccount{
    String accountName;
    String phoneNumber;
    String userName;
}

